#ifndef CONFIGURATION_H
#define CONFIGURATION_H

#include "common/parameters.h"
#include "common/types.h"
#include "AGeometry.h"

class Configuration
{
    public:
        Configuration(int _id, Parameters *parameters);
        virtual ~Configuration();
        virtual void draw(bool texture) const = 0;
        inline bool is_generated() const {return is_configuration_generated;}
        virtual void generate_geometry() = 0;
        virtual void load_simulation(QVector<time_zone *> zones) {_zones = zones;}
        virtual void draw_simulation(int step, bool texture) const = 0;
        virtual void clear();
        inline int get_id() const {return _id;}
        inline const Parameters &get_parameters() const {return *_parameters;}
    private:
        virtual void free_geometry_memory();
        virtual void free_refcurves_memory();
        virtual void free_steps_memory();
    protected:
        int _id;  // the id of the configuration
        bool is_configuration_generated;
        bool is_refcur_map_generated;
        bool is_refcurves_generated;
        Parameters *_parameters; // the input parameters
        QVector<Refcurve> reference_curves; // the all reference curves of the configuration
        QVector<AGeometry *> _geometries; // the all geometries that compose the configuration
        QVector<time_zone *> _zones; // the all zones from wake.tec
};

#endif // CONFIGURATION_H
